home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 235 / Issue 235 - September 2007 - DPCS0907DVD.ISO / Extras / NetObjects Fusion / NOF10.exe / data1.cab / FSI / lib / nof / dialogs / BrowserDlg.js next >
Encoding:
Text File  |  2007-04-11  |  4.1 KB  |  106 lines

  1. /****i* SOURCE_FILE/INFO
  2.   *
  3.   * NAME
  4.   *  BrowserDlg.js
  5.   *
  6.   * USAGE
  7.   *  Part of Netobjects JavaScript Library.
  8.   *
  9.   * COPYRIGHT
  10.   *  Copyright ⌐ 2000-2005 Website Pros, Inc.
  11.   *  All Rights Reserved.
  12.   *
  13.   *  This is an unpublished work protected by Website Pros, Inc.
  14.   *  as a trade secret, and is not to be used or disclosed except as
  15.   *  expressly provided in a written license agreement executed by
  16.   *  you and Website Pros, Inc.
  17.   *
  18.   *      <copyright@websitepros.com>
  19.   *
  20.   * NOTES
  21.   *  JavaScript code.
  22.   *
  23.   *****/
  24.  
  25. if (!IS.isModuleInitialized("IS.NOF.DIALOGS.BrowserDlg"))
  26. {
  27.   
  28.   /****h* NOF_JavaScript_Library/NOF.DIALOGS.BrowserDlg
  29.     *
  30.     * NAME
  31.     *  NOF.DIALOGS.BrowserDlg
  32.     *
  33.     * DESCRIPTION
  34.     *    
  35.     * The <code>BrowserDlg</code> class 
  36.     *
  37.     ****/
  38.   
  39.   /**
  40.     * constructor   
  41.     **/ 
  42.   function DIALOGS_BrowserDlg() {
  43.     this.__proto__ = DIALOGS_BrowserDlg.prototype;            
  44.   }
  45.   {
  46.     var member = DIALOGS_BrowserDlg.prototype;    
  47.     member.CLASS_NAME        = "DIALOGS.BrowserDlg"; //member.NAMESPACE + "." + "BrowserDlg";        
  48.     
  49.     var method = DIALOGS_BrowserDlg.prototype;    
  50.     
  51.     /**
  52.     * Opens a browser window within a modal dialog (the function will not return until the dialog is closed).
  53.     * 
  54.     * @param pURL specifies the URL to open in the browser window.
  55.     * If you want to open a local file you can use a relative path.
  56.     * In an external URL you can specify the symbolic name of a password.
  57.     * @param pHeader can be used to add information to the header of the request.
  58.     * @param pWidth the width of the dialog.
  59.     * @param pHeight the height of the dialog.        
  60.     * @return true if the dialog is successfully opened and if it is closed by calling 
  61.     * closeDialog with the argument true. Otherwise the function returns false (and 
  62.     * the NOF.App.Cancel property is set to true).
  63.     **/
  64.     method.openDialog = function (/*String*/ pURL,/*String*/ pHeader, /*int*/ pWidth, /*int*/ pHeight) {             
  65.       return NOF.App.getFSIApp().OpenDialog(pURL, pHeader, pWidth, pHeight);
  66.     }
  67.     
  68.     /**
  69.     * Closes a dialog previously opened (using openDialog or openBrowser).
  70.     * This function needs to be called from within an HTML page shown in the dialog 
  71.     * because openDialog is modal. The argument will be passed on to the caller of openDialog.
  72.     * @param result        
  73.     **/
  74.     method.closeDialog = function (/*boolean*/ result) {             
  75.       NOF.App.getFSIApp().CloseDialog(result);
  76.     }
  77.     
  78.     /**
  79.     * Opens a browser window within a modal dialog (the function will not return until the dialog is closed).
  80.     * 
  81.     * @param pURL specifies the URL to open in the browser window.
  82.     * If you want to open a local file you can use a relative path.
  83.     * In an external URL you can specify the symbolic name of a password.
  84.     * @param pHeader can be used to add information to the header of the request.
  85.     * @param pWidth the width of the dialog.
  86.     * @param pHeight the height of the dialog.                
  87.     * @param controlsEnabled true if window should contains controls for going back,
  88.     *  forward, home, and print; false if window should contains controls, but are disabled except the print control;
  89.     *  null if window doesn't need any of these controls.
  90.     * @return true if the dialog is successfully opened and if it is closed by calling 
  91.     *  closeDialog with the argument true. Otherwise the function returns false (and 
  92.     *  the NOF.App.Cancel property is set to true).
  93.     **/
  94.     method.openBrowser = function (/*String*/ pURL,/*String*/ pHeader, /*int*/ pWidth, /*int*/ pHeight, /*boolean*/ controlsEnabled) {
  95.       if (controlsEnabled == null) {        
  96.         return NOF.App.getFSIApp().OpenDialog(pURL, pHeader, pWidth, pHeight);
  97.       } else if (controlsEnabled == true) {
  98.         return NOF.App.getFSIApp2().OpenBrowser(pURL, pHeader, pWidth, pHeight);
  99.       } else {
  100.         return NOF.App.getFSIApp2().BrowserNoCtrl(pURL, pHeader, pWidth, pHeight);
  101.       }
  102.     }
  103.   }
  104.   
  105.   NOF.DIALOGS.__proto__.BrowserDlg = new DIALOGS_BrowserDlg();
  106. }